let uid = 0
let initMixin = function(Wine){
	Wine.prototype._init = function(options){
		this.$el = null  //目标元素
		this.$parent = options.parent //指定父实例，
		this.$children = [] //当前实例的子实例
		this.$els = {} //访问DOM元素的索引 w-el
		this.$root = this.$parent ? this.$parent.$root : this  //指定根节点
		this.$options = options
		this._uid = uid++
		this._events = {} //对象监听的事件，此事件为Wine事件不是DOM事件
		this._store = {} //观察数据对象
		this._watchers = [] //监听的数据数组 

		this._isWine = true //标示此为Wine实例
		if (this.$parent) {
			//如果此实例子存在父实例，将本次实例添加到父实例的$children数组中
			this.$parent.$children.push(this)
		}

		/**
		 *  Wine生命周期钩子
		 */
		this._implementationHook('init')
		this._initObject()
		this._implementationHook('viewDidLoad')
		
		if (options.el) {
			//挂载指定的目标元素
			this._mount(options.el)
		}
	}
	Wine.prototype._initObject = function(){

	}
}
module.exports = initMixin